
import sys
import random

def f(x):
    return x**2-1 if x>=0 else 2*(x**2)-5

a=[round(random.random()*(-1000)+1000,2) for i in range(10)]
for i  in range(10):
    fin = open('{}.in'.format(i+1),'w')
    fout = open('{}.out'.format(i+1),'w')
    print(a[i],file=fin)
    print('{:.2f}'.format(f(a[i])),file=fout)
    fin.close()
    fout.close()
